package com.example.myerp.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.myerp.pojo.S_cell;
import com.example.myerp.pojo.S_cellAsion;
import com.example.myerp.service.S_cellService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zhuxingyu
 * @since 2021-08-10
 */
@RestController
@RequestMapping("/purchase/s_cell")
public class S_cellController {

    @Autowired
    S_cellService s_cellService;

    @RequestMapping("/confighouse")
    public List<S_cell> confighouse(Integer firstKindId, Integer secondKindId, Integer thirdKindId) {
        return s_cellService.confighouse(firstKindId, secondKindId, thirdKindId);
    }

    @RequestMapping("/insertS_cell")
    public void insertS_cell(S_cell s_cell) {
        s_cellService.insertS_cell(s_cell);
    }

    @RequestMapping("/searchNoCheck")
    public IPage<S_cellAsion> searchNoCheck(Long pageNum, Long pageSize) {
        return s_cellService.searchNoCheck(pageNum, pageSize);
    }

    @RequestMapping("/shS_cell")
    public void shS_cell(S_cell s_cell) {
        s_cellService.shS_cell(s_cell);
    }

    @RequestMapping("/cellConf")
    public Integer check_Scell_Config(Integer productId) {
        return s_cellService.check_Scell_Config(productId);
    }

    @RequestMapping("/onLineList")
    public IPage<S_cellAsion> onLineList(Long pageNum, Long pageSize) {
        return s_cellService.onLineList(pageNum, pageSize);
    }
}
